# from reuseable import extract_tcmsp_data, save_herb_data_to_excel, process_herb_list_from_excel
from API_Herbs import extract_tcmsp_data_by_en_name, extract_tcmsp_data_by_cn_name, process_herb_list_from_excel
# Extract data for a single herb
# herb_data = extract_tcmsp_data("Saposhnikoviae Radix")
# if herb_data is not None:
#     print(f"Found {len(herb_data)} ingredients for this herb")
#     # Do something with the data
#     print(herb_data.head())

# Extract and save to Excel
# save_herb_data_to_excel("Saposhnikoviae Radix", "fangfeng_data.xlsx")

# Usage Whole File
successful, failed = process_herb_list_from_excel("./API/中药.xlsx", "./API/tcmsp_results")
print(f"Processed {successful + failed} herbs with {successful} successes and {failed} failures")